import './assets/main.css'

import { createApp } from 'vue'
import { createPinia } from 'pinia'
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
// 分页组件
import Pagination from '@/components/Pagination.vue'

import App from './App.vue'
import router from './router'
import './router/permission.js'
import 'element-plus/dist/index.css'
import ElementPlus from 'element-plus'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'

const app = createApp(App)
app.config.globalProperties.$globalAttribute = {
    baseUrl: "http://localhost:8081",
    primaryButton: {
        "color": "#ffffff",
        "background-color": "#409eff",
        "border-bottom-left-radius": 0,
        "border-top-left-radius": 0
    }
}
// 配置 ElementPlus 使用中文
app.use(ElementPlus, {
    locale: zhCn,
})

app.component('Pagination', Pagination)

const pinia = createPinia()

pinia.use(piniaPluginPersistedstate)

app.use(pinia)
app.use(router)
app.mount('#app')
